/*
 * Copyright 2021-2030 itbox.com All right reserved. This software is the confidential and proprietary information
 * of itbox.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it
 * only in accordance with the terms of the license agreement you entered into with itbox.com.
 *//*

package cn.itbox.example.infrastructure.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

*/
/**
 * @BelongProject springboot-study
 * @BelongPackage cn.itbox.example.application.config
 * @Description TODO
 * @ClassName MyMetaObjectHandler
 * @Author xingc
 * @Date 2023/11/27 18:29
 * @Version 1.0.0
 *//*

@Slf4j
@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
        if (log.isInfoEnabled()) {
            log.info("start insert fill ...");
        }
        //Object creatTime = getFieldValByName("createTime", metaObject);
        //if (ObjectUtil.isEmpty(creatTime)) {
        //    setFieldValByName("createTime", new Date(), metaObject);
        //}
        //setFieldValByName("updateTime", new Date(), metaObject);
    }

    @Override
    public void updateFill(MetaObject metaObject) {
        if (log.isInfoEnabled()) {
            log.info("start update fill .......");
        }
        //setFieldValByName("updateTime", new Date(), metaObject);
    }
}
*/
